package com.example.myannotation

import org.junit.Test

import org.junit.Assert.*
import java.lang.reflect.Proxy

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    @Test
    fun student(){
        val lance = Lance() as NDK

        /**
         * 动态代理
         * 1.类加载器
         * 2.要代理的接口
         * 3.回调
         */
        Proxy.newProxyInstance(lance::class.java.classLoader,lance::class.java.interfaces,ProxyInvokeHandler(lance))

    }
}